package com.gg.baselibrary

import android.content.pm.ActivityInfo
import android.os.Bundle
import android.support.v7.app.AppCompatDelegate
import com.alibaba.android.arouter.launcher.ARouter
import com.gg.utils.AppManager
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity

/**
 * Creator : GG
 * Time    : 2017/10/14
 * Mail    : gg.jin.yu@gmail.com
 * Explain :
 */
open class BaseMVVMActivity : RxAppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        ARouter.getInstance().inject(this)
        super.onCreate(savedInstanceState)
        AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)

        requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT

        AppManager.attach(this)


    }

    override fun onDestroy() {
        super.onDestroy()

        AppManager.detach(this)
    }


}
